home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ATUtilities.lha
/
ATUtilities
/
ASM
/
QMM.ASM
< prev
next >
Wrap
Assembly Source File
|
2000-09-29
|
3KB
|
213 lines
code segment
assume cs:code,ds:code
org 0
toAmiga equ 0
toPC equ 2000
toAmigaCNT equ 4000+00
toPCCnt equ 4000+02
arg1 equ 4000+04
arg2 equ 4000+06
arg3 equ 4000+08
arg4 equ 4000+0A
befehl equ 2
status equ 3
end_adresse equ 14
anzahl equ 18
buffer equ 14
anz_befehle equ 16
qmm_treiber:
dw -1,-1
db 00h,80h
dw offset strategie
dw offset interrupt
db "QMM1 "
fkt_tab:
dw offset init
dw offset dummy
dw offset dummy
dw offset not_supported
dw offset read
dw offset read_p
dw offset dummy
dw offset reset
dw offset write
dw offset write
dw offset dummy
dw offset dummy
dw offset not_supported
dw offset dummy
dw offset dummy
dw offset dummy
dw offset write
db_ptr dw (?),(?)
janus_ofs dw (?)
strategie proc far
mov cs:db_ptr,bx
mov cs:db_ptr+2,es
ret
strategie endp
interrupt proc far
pusha
push cs
pop ds
les di,cs:db_ptr
mov bl,es:b[di+befehl]
cmp bl,anz_befehle
jle aufruf
mov ax,8003h
jmp interrupt_ende
aufruf:
shl bl,1
xor bh,bh
call [fkt_tab+bx]
les di,cs:db_ptr
interrupt_ende:
or ax,100h
mov es:w[di+status],ax
popa
ret
interrupt endp
dummy proc near
xor ax,ax
ret
dummy endp
not_supported proc near
mov ax,8003h
ret
not_supported endp
reset proc near
xor ax,ax
ret
reset endp
read proc near
mov ax,8003h
ret
read endp
read_p proc near
mov ax,8003h
ret
read_p endp
write proc near
push ds
lds si,es:w[di+buffer]
mov es,0d400
mov di,cs:janus_ofs
mov ax,es:w[di+toAmigaCNT]
cmp ax,1999
jle write_start
mov ax,20
jmp write_ende
write_start:
add di,ax
mov ch,ds:b[si]
mov es:b[di],ch
mov di,cs:janus_ofs
add ax,1
mov es:w[di+toAmigaCNT],ax
mov es:w[di+arg1],1
cmp ax,200
jle xxx
mov ah,7
mov al,31
int 0b
xxx:
xor ax,ax
write_ende:
pop ds
ret
write endp
call_and_wait proc near
mov ah,7
mov al,31
int 0b
mov ah,8
mov al,31
int 0b
ret
call_and_wait endp
init proc near
push cs
pop ds
mov dx,offset init_text
mov ah,9
int 21h
mov ah,1
mov al,31
int 0b
mov janus_ofs,di
cmp di,-1
jne janus_okay
mov dx,offset fehler_text
mov ah,9
int 21h
les di,cs:db_ptr
mov es:w[di+end_adresse],offset qmm_treiber
mov es:w[di+end_adresse+2],cs
jmp init_ende
janus_okay:
les di,cs:db_ptr
mov es:w[di+end_adresse],offset ende
mov es:w[di+end_adresse+2],cs
mov dx,offset okay_text
mov ah,9
int 21h
init_ende:
xor ax,ax
ret
init endp
init_text db "ATUtilities QMM-Schnittstellen-Handler - Version 1.0",13,10
db "Copyright (C) 1993 by Thomas Dreibholz",13,10,"$"
fehler_text db "Amiga-Handler an Janus-Interrupt 31 nicht aktiv!",13,10
db "Bitte berprfen Sie die Installation der ATUtilities.",13,10
db "Der Treiber konnte nicht installiert werden.",13,10,10,"$"
okay_text db "Schnittstelle ist als QMM1: verfgbar.",13,10
db "Der Treiber wurde erfolgreich installiert.",13,10,10,"$"
ende equ this byte
code ends
end